//==================================================
// 作 者：曾浩
// 日 期：2012-03-15
// 描 述：介绍本文件所要完成的功能以及背景信息等等
//==================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoreFrame.Core.Orm;

namespace MarchEstate.Manager.BusinesEntity
{
	[Serializable]
	[Table(TableName = "WY_Building", EntityType = EntityType.Table, IsGB = false)]
	public abstract class AbstractBuilding : CoreFrame.Business.AbstractBusines
	{
		private string _buildingcode;//编号
		/// <summary>
		/// 编号
		/// </summary>
		[Column(FieldName = "BuildingCode", DataKey = true, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string BuildingCode
		{
			get { return _buildingcode; }
			set { _buildingcode = value; }
		}
		private string _buildingname;//名称
		/// <summary>
		/// 名称
		/// </summary>
		[Column(FieldName = "BuildingName", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string BuildingName
		{
			get { return _buildingname; }
			set { _buildingname = value; }
		}
		private string _areacode;//管理区域编号
		/// <summary>
		/// 管理区域编号
		/// </summary>
		[Column(FieldName = "AreaCode", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string AreaCode
		{
			get { return _areacode; }
			set { _areacode = value; }
		}
        private string _unit;//单元数
		/// <summary>
		/// 单元数
		/// </summary>
        [Column(FieldName = "Unit", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
        public string Unit
		{
			get { return _unit; }
			set { _unit = value; }
		}
		private int _floornum;//楼层数
		/// <summary>
		/// 楼层数
		/// </summary>
		[Column(FieldName = "FloorNum", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public int FloorNum
		{
			get { return _floornum; }
			set { _floornum = value; }
		}
		private int _housnum;//房屋数
		/// <summary>
		/// 房屋数
		/// </summary>
		[Column(FieldName = "HousNum", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public int HousNum
		{
			get { return _housnum; }
			set { _housnum = value; }
		}
		private string _developers;//开发商
		/// <summary>
		/// 开发商
		/// </summary>
		[Column(FieldName = "Developers", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string Developers
		{
			get { return _developers; }
			set { _developers = value; }
		}
		private string _contractors;//承建商
		/// <summary>
		/// 承建商
		/// </summary>
		[Column(FieldName = "Contractors", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string Contractors
		{
			get { return _contractors; }
			set { _contractors = value; }
		}
		private string _location;//地理位置
		/// <summary>
		/// 地理位置
		/// </summary>
		[Column(FieldName = "Location", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string Location
		{
			get { return _location; }
			set { _location = value; }
		}
		private string _usage;//用途
		/// <summary>
		/// 用途
		/// </summary>
		[Column(FieldName = "Usage", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string Usage
		{
			get { return _usage; }
			set { _usage = value; }
		}
		private decimal _totalcoversarea;//总占地面积
		/// <summary>
		/// 总占地面积
		/// </summary>
		[Column(FieldName = "TotalCoversArea", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public decimal TotalCoversArea
		{
			get { return _totalcoversarea; }
			set { _totalcoversarea = value; }
		}
		private decimal _totalconstrucarea;//总建筑面积
		/// <summary>
		/// 总建筑面积
		/// </summary>
		[Column(FieldName = "TotalConstrucArea", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public decimal TotalConstrucArea
		{
			get { return _totalconstrucarea; }
			set { _totalconstrucarea = value; }
		}
		private decimal _totalusearea;//总使用面积
		/// <summary>
		/// 总使用面积
		/// </summary>
		[Column(FieldName = "TotalUseArea", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public decimal TotalUseArea
		{
			get { return _totalusearea; }
			set { _totalusearea = value; }
		}
		private decimal _greenrate;//绿化率
		/// <summary>
		/// 绿化率
		/// </summary>
		[Column(FieldName = "GreenRate", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public decimal GreenRate
		{
			get { return _greenrate; }
			set { _greenrate = value; }
		}
		private DateTime _begindate;//开工日期
		/// <summary>
		/// 开工日期
		/// </summary>
		[Column(FieldName = "BeginDate", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public DateTime BeginDate
		{
			get { return _begindate; }
			set { _begindate = value; }
		}
		private DateTime _completedate;//竣工日期
		/// <summary>
		/// 竣工日期
		/// </summary>
		[Column(FieldName = "CompleteDate", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public DateTime CompleteDate
		{
			get { return _completedate; }
			set { _completedate = value; }
		}
		private DateTime _handdate;//交楼日期
		/// <summary>
		/// 交楼日期
		/// </summary>
		[Column(FieldName = "HandDate", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public DateTime HandDate
		{
			get { return _handdate; }
			set { _handdate = value; }
		}
		private string _responsmen;//负责人
		/// <summary>
		/// 负责人
		/// </summary>
		[Column(FieldName = "ResponsMen", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string ResponsMen
		{
			get { return _responsmen; }
			set { _responsmen = value; }
		}
		private string _pym;//拼音码
		/// <summary>
		/// 拼音码
		/// </summary>
		[Column(FieldName = "Pym", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string Pym
		{
			get { return _pym; }
			set { _pym = value; }
		}
		private string _wbm;//五笔码
		/// <summary>
		/// 五笔码
		/// </summary>
		[Column(FieldName = "Wbm", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string Wbm
		{
			get { return _wbm; }
			set { _wbm = value; }
		}
		private string _pictureurl;//图片信息
		/// <summary>
		/// 图片信息
		/// </summary>
		[Column(FieldName = "PictureUrl", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string PictureUrl
		{
			get { return _pictureurl; }
			set { _pictureurl = value; }
		}
		private int _deleteflag;//删除标志
		/// <summary>
		/// 删除标志
		/// </summary>
		[Column(FieldName = "DeleteFlag", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public int DeleteFlag
		{
			get { return _deleteflag; }
			set { _deleteflag = value; }
		}
		private string _memo;//备注
		/// <summary>
		/// 备注
		/// </summary>
		[Column(FieldName = "Memo", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string Memo
		{
			get { return _memo; }
			set { _memo = value; }
		}

        public abstract bool Save(string type);

        public abstract bool Delete(string _buildingCode);

        public abstract List<AbstractBuilding> GetBuildingList(string _areaCode);
     
        public abstract AbstractBuilding GetBuilding(string _buildingCode);

        /// <summary>
        /// 得到大楼Code Name
        /// </summary>
        /// <returns></returns>
        public abstract System.Data.DataTable GetBuildingFieldList(string _areaCode);
	}
}